package com.house.framework.utils;

import com.alibaba.fastjson.JSONObject;

/**
 * @Description: TODO
 * @Author: ArvinWoo
 * @Date: 2022/12/20 12:33
 * @ClassName: StrToObjUtils
 **/
public class StrToObjUtils {
    public StrToObjUtils() {
    }

    public static String parameterValue(JSONObject item, String decName) {
        String value = "";
        if (item.containsKey(decName)) {
            value = item.getString(decName);
        }

        return value;
    }

    public static int parameterInt(JSONObject item, String decName) {
        int value = 0;
        if (item.containsKey(decName)) {
            value = item.getIntValue(decName);
        }

        return value;
    }
}
